#pragma once
#pragma   warning(disable: 4355)

// CConsoleDlg
#include "CmdConsole.h"

class CConsoleDlg : public CWnd,ConsoleCommandHelper::CommandProc
{
	DECLARE_DYNAMIC(CConsoleDlg)
public:
	CConsoleDlg();
	virtual ~CConsoleDlg();

	BOOL Create(CWnd* pParent = NULL);
	void Destory();
	CCmdConsole& GetConsole(){return m_CmdConsole;};
	virtual void Output(CString str,COLORREF color=(0,0,0));
	CString ReadCommand();
	virtual void OnConsoleCommand(CString& strCmd);
protected:
	virtual void OnInit();
	CCmdConsole m_CmdConsole;
	CRichEditCtrl m_OutputConsole;
	CString m_Command;
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnDestroy();
	afx_msg void OnClose();
};


